package pers.qianyu.month_202102.date_20210207;

/**
 * 172. 阶乘后的零
 * https://leetcode-cn.com/problems/factorial-trailing-zeroes/
 *
 * @author mizzle rain
 * @date 2021-02-07 15:36
 */
public class TrailingZeroes {
    public int trailingZeroes(int n) {
        int cnt = 0;
        while (n > 0) {
            cnt += n / 5;
            n /= 5;
        }
        return cnt;
    }
}
